package com.geh.learn.thread;

import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * Created by gehui on 2017/2/23.
 */
public class ExecutorServiceTest {
    public static void main(String[] args) {

        ExecutorService executorService = Executors.newFixedThreadPool(10);

        executorService.execute(new Runnable() {
            public void run() {
                System.out.println("Asynchronous task");
            }
        });

        executorService.execute(() -> {
            System.out.println("This is lambda.");
        });

        executorService.shutdown();

    }
}
